#include <iostream>
#include <string>
#include <memory>
// 基本需求类（抽象类）
class RentHouse
{
public:
    virtual void Request() = 0;
};

// 房东的具体需求类
class Landlord : public RentHouse
{
public:
    void Request() override
    {
        std::cout << "将房⼦租出去\n";
    }
};

// 中介代理类
class Proxy : public RentHouse
{
public:
    void Request() override
    {
        _landlord = std::make_unique<Landlord>();
        std::cout << "发布招租启示\n";
        std::cout << "带⼈看房\n";
        _landlord->Request();
        std::cout << "负责租后维修\n";
    }

private:
    std::unique_ptr<Landlord> _landlord;
};

int main()
{
    Proxy pro;
    pro.Request();
    return 0;
}